1. Field of the Invention
The present invention relates to a communication apparatus adapted to use two or more different communication standards, in an electronic device capable of transmitting and receiving information data via a digital interface.
2. Related Background Art
Recently, apparatuses and systems for processing not only text information such as documents but also various information such as images and sounds are beginning to be extensively used with the improvement of the processing capability of a central processing unit (CPU) using a computer or the like, the progress of a graphical operating system (OS) for operating hardware, the increase in capacity and the progress of digitization of communication information in a network, and the development of information compression techniques.
With the development of such multimedia technologies, it is becoming possible to transmit all types of data in all forms by all communication protocols via a single digital interface (digital I/F). It is also becoming possible for an apparatus corresponding to one communication protocol and incorporating a plurality of units to externally control each unit and exchange information with external devices.
As an example of the digital I/F bus systems described above, a communication system has been proposed in which AV devices, such as a digital video tape recorder (to be referred to as a VTR hereinafter), a digital television receiver, and a tuner, and a personal computer (to be referred to as a PC hereinafter) are mutually connected by an IEEE1394 serial bus (to be referred to as 1394 hereinafter), and digital video signals and digital audio signals are transmitted and received between these electronic devices. An outline of this 1394 system will be described below.
As shown in FIG. 1, the 1394 system includes, as digital devices, a PC and a VTR corresponding to VGA (Video Graphics Array) inputs from a digital I/F, and a digital camera (to be referred to as a DCAM hereinafter) and a digital cam coder (to be referred to as DVCR) corresponding to VGA outputs from a digital I/F. The DVCR and the PC, the PC and the VTR, and the VTR and the DCAM are connected by the 1394 serial bus described above.
Each digital device described above has a function of relaying digital data and control data on the 1394 serial bus. Also, a cable for the 1394 serial bus includes three shielded twisted pair lines. Each twisted pair line is used to transfer protocol signals and data and supply electric power. Therefore, the whole system can operate even when a certain device is turned off in the system.
The basic configuration of each digital device has an operation unit as a user interface, a display unit, a CPU for controlling the operation of the whole device, forming packets for communication, and holding addresses, a digital I/F for the 1394 serial bus, and a switch unit for performing switching between a deck unit, a tuner unit, or a camera unit (neither is shown) and the digital I/F.
In this 1394 system, as shown in FIG. 2, communication is performed at a predetermined communication cycle (125 μs). Data having a time axis such as video data or audio data is transmitted by isochronous (synchronous) communication by which a transfer band is guaranteed at a fixed data rate. Control data such as a control command is transmitted irregularly, where necessary, by asynchronous communication.
In communication like this, a cycle start packet exists at the beginning of each communication cycle, and a period for transmitting a packet for isochronous communication is set subsequently to the cycle start packet. A plurality of channels of isochronous communication can be simultaneously performed by assigning channel numbers to packets for isochronous communication.
For example, when channel 1 is assigned to communication from the DVCR to the VTR, the DVCR transmits an isochronous communication packet of channel number 1 onto the bus immediately after the cycle start packet. Meanwhile, the VTR monitors packets on the bus and receives the packet assigned with channel number 1. In this manner isochronous communication is executed between the DVCR and the VTR.
Analogously, when channel number 2 is assigned to a packet from the DCAM to the PC, isochronous communication is executed between the DCAM and the PC by transmitting the packet of channel number 2 onto the bus after the packet of channel number 1, and the isochronous communications between channel 1 and channel 2 are performed parallel. A period from the completion of transmission of all isochronous communication packets in each communication cycle to the next cycle start packet is used in asynchronous communication.
Bus management by which the 1394 serial bus system described above can operate will be described below.
An apparatus serving as a bus manager previously checks the network structure and the connection states of all nodes and controls bus communication by defining each node ID and controlling isochronous communication.
That is, in the communication system as described above, when the power supply is turned on or when a new digital device is connected or a certain device is disconnected, node IDs (physical addresses #0, #1, #2, and #3 in FIG. 3) are automatically assigned to the individual devices (nodes) in accordance with their connection states by the following procedure based on an address program and an address table stored in an internal memory of the CPU, thereby automatically setting topology.
This node ID assignment procedure will be briefly described below. This procedure includes determination of the hierarchical structure of the system and assignment of physical addresses to the nodes.
Assume that the above digital devices, i.e., the PC, DVCR, VTR, and DCAM are nodes A, B, C, and D, respectively.
First, each node transmits to a partner node, to which this node is connected by the 1394 serial bus, information indicating that the partner is its parent. While giving priority to a node first transmitting this information to its partner, the parent-child relationship between the nodes in this system, i.e., the hierarchical structure of the system and a route node which is not a child of any other node are finally determined.
More specifically, the node D informs the node C that the partner is a parent, and the node B informs the node A that the partner is a parent. If the node A informs the node C that the partner is a parent and the node C informs the node A that the partner is a parent, a node which first transmits the information to its partner is given priority. That is, if the transmission from the node C is earlier, the node A is regarded as a parent of the node C. As a consequence, the node A is not a child of any other node. If this is the case, the node A is a route node.
After the parent-child relationship between the digital devices is thus determined, assignment of physical addresses is performed. This physical address assignment is basically done in such a manner that parent nodes permit child nodes to perform address assignment and these child nodes permit themselves to perform address assignment from one connected to the smaller port number.
When the parent-child relationship is determined as above in the example shown in FIG. 3, the node A first permits the node B to perform address assignment. As a consequence, the node B assigns physical address #0 to itself. The node B sends this information onto the bus to inform the other nodes that “physical address #0 is already assigned”.
Next, the node A permits the node C to perform address assignment, and the node C similarly permits the node D, i.e., the child of the node C, to perform address assignment. Consequently, the node D assigns physical address #1, next to physical address #0, to itself, and sends this information onto the bus.
Thereafter, the node C assigns physical address #2 to itself and sends this information onto the bus. Finally, the node A assigns physical address #3 to itself and sends this information onto the bus.
A data transfer procedure will be described next.
Data transfer is enabled by assigning physical addresses as described above. In the 1394 serial bus system, however, arbitration of the bus use rights is performed by the route node prior to data transfer. That is, in the 1394 as shown in FIG. 4, only data of one channel is transferred at a certain timing. Therefore, the bus use rights must be arbitrated first.
When each node wants to perform data transfer, the node requests its parent node to issue the bus use right. As a consequence, the route node arbitrates the requests for the bus use rights from these nodes. A node which acquires the bus use right as a result of the arbitration designates the transmission rate before beginning data transfer. That is, the node informs the transmission destination node that the transmission rate is 100, 200, or 400 Mbps.
Thereafter, in the case of isochronous communication, the transmission source node starts data transfer by the designated channel immediately after receiving a cycle start packet transmitted by the route node as a cycle master in synchronism with the communication cycle. Note that the cycle master transmits the cycle start packet onto the bus and also matches the time of the individual nodes.
In the case of asynchronous communication in which control data such as a command is transferred, on the other hand, after synchronous transfer in each communication cycle is complete, arbitration for asynchronous communication is performed, and data transfer from the transmission source node and the transmission destination node is started.
In addition to the IEEE1394 standard described above, the RS-232C standard and the RS-422 standard presently exist and are used as the conventional serial data communication methods. These standards assume mutual connection using serial binary data exchange between a data terminal equipment (DTE) and a data circuit-terminating equipment (DCE). These standards are formed and open to the public by the American National Standards Institute (ANSI).
As another example of the digital I/F bus systems, a universal serial bus (to be referred to as a USB hereinafter) as defined in Universal Serial Bus Specification (Revision 1.0, Jan. 15, 1996) is proposed. This bus is invented as an external bus for connecting a PC and its peripheral devices. An outline of this USB system will be described below.
The connection form of the USB will be described with reference to FIG. 3. This USB system comprises a host computer 300 such as a PC, a route hub 302, a first device 304 which is a recording medium such as a hard disk, a composite device 306 such as a camera-integrated VTR, a first hub 308, a second device 310 such as a video camera, a third device 312 such as a VTR, a second hub 314, a fourth device 316 which is an input device such as a keyboard, and a fifth device 318 which is a pointing device such as a mouse. A hub has a function of adding a USB device. Also, a device is a terminal equipment including a USB bus interface (not shown). In this USB as shown in FIG. 3, the terminal equipments are connected via the hubs including the route hub 302 on the host computer 300, thereby forming a multiple star connection.
Since the host computer 300 has rights to access the first, second, third, and fourth devices 304, 310, 312, and 316, data exchange between these devices is performed via the host computer 300. Therefore, bus arbitration between the devices is not performed.
In the USB, data transfer is performed by a frame whose unit is 1±0.05 ms. FIG. 4 shows the structure of the frame in the USB. Packets are packed in this frame in accordance with the purpose and transferred. Four types of packets are defined in the USB. The first one is a token packet, the second one is a start-of-frame packet (to be referred to as an SOF packet hereinafter), the third one is a data packet, and the fourth one is a handshake packet. The frame is started by the SOF packet.
The host computer 300 performs data transfer with a plurality of devices by sequentially sending data transfer requests previously scheduled in the frame. If data is large-amount data, such as image data, which cannot be contained in a single frame, the host computer 300 divides the data in units of frames and transfers the divided data.
Packet fields are packed in the above four types of packets in accordance with the purpose and transferred. In the USB, six types of packet fields are defined. The first one is an 8-bit packet identifier field (to be referred to as a PID hereinafter), the second one is a 7-bit address field (to be referred to as an ADDR hereinafter), the third one is a 4-bit endpoint field (to be referred to as an ENDP hereinafter), the fourth one is an 11-bit frame number field, the fifth one is a 1- to 1023-byte data field, and the sixth one is a 5- or 16-bit cyclic redundancy checks field (the 5- and 16-bit ones will be referred to as a CRC5 and a CRC16, respectively, hereinafter). The four types of packets described above are constituted by combining these packet fields.
FIGS. 5A to 5D show the arrangements of the four types of packets. As shown in FIG. 5A, the token packet is constituted by the combination of the PID, ADDR, ENDP, and CRC5 fields. As shown in FIG. 5B, the SOF packet is constituted by the combination of the PID, frame number, and CRC5 fields. As shown in FIG. 5C, the data packet is constituted by the combination of the PID, data, and CRC16 fields. As described above, the data field has 1- to 1023-byte data. Also, as shown in FIG. 5D, the handshake packet is constituted only by the PID.
In the USB, two transfer modes are defined. One is a full-speed transfer mode whose average bit rate is 12 Mbps. The other is a low-speed transfer mode whose average bit rate is 1.5 Mbps.
Also, four data transfer methods are defined in the USB. The first one is isochronous transfer. In isochronous transfer, a transfer width which is a data amount of transfer performed for each frame and a transfer time from transfer request to transfer start are guaranteed. Also, in isochronous transfer, no retransmission request can be made even if an error occurs in transfer data. The second one is interrupt transfer. In interrupt transfer, only inputs from the individual devices to the host computer 300 are possible. Also, in interrupt transfer, the data transfer priority order on the bus is comparatively high. The third one is bulk transfer. In bulk transfer, the data transfer priority order is the lowest of the four transfer methods. The fourth one is control transfer. Control transfer is performed to exchange setup data for setting up the individual devices.
The 1394 serial bus system and the USB described above are communication systems which have not been put into practical use until recently, and the conventional communication systems using RS-232C and RS-422 are still extensively used presently.
The present situation, therefore, is that all of digital devices corresponding to the 1394, digital devices corresponding to the USB, and digital devices corresponding to RS-232C and RS-422 coexist.
Accordingly, it is expected that apparatuses including the interfaces of both the 1394 and the USB which are main streams in recent years will be extensively demanded. It is also expected that apparatuses including both the 1394 interface and the interface of RS-232C or RS-422 will be extensively demanded. Furthermore, it is expected that apparatuses including a plurality of interfaces of, e.g., the 1394, the USB, and RS-232C will be extensively demanded.
If, however, two or more types of communication devices are incorporated into a single apparatus to perform communication by two or more communication systems, the circuit scale is increased, and this significantly increases the cost.